<?php
/**
 * Created by PhpStorm.
 * User: venki
 * Date: 2023/12/4
 * Time: 14:45
 */

namespace app\services;

use app\models\User;

class UserService
{
    public static function getOne($params)
    {
//        $where = [];
//        if (!empty($params['name'])) $where['name'] = $params['name'];
//        if (!empty($params['title'])) $where['title'] = $params['title'];
//        if (!empty($params['body'])) $where['body'] = $params['body'];

        $user = User::find()->applyFilter(User::find())->get();
        var_dump($user);die;
        $searchModel = new User();
        $dataProvider = $searchModel->applyFilter(User::find())->asArray()->all();

        die;
    }
}